package org.xyl.dto;

import java.util.List;

/**
 * RAG查询响应数据传输对象
 * 包含查询结果、相关上下文和来源信息
 */
public class RAGResponse {
    
    /**
     * 用户问题
     */
    private String question;
    
    /**
     * 生成的回答
     */
    private String answer;
    
    /**
     * 检索到的相关上下文列表
     */
    private List<String> relevantContexts;
    
    /**
     * 来源信息列表（通常是相似度分数）
     */
    private List<Double> sources;
    
    /**
     * 处理时间（毫秒）
     */
    private long processingTime;
    
    /**
     * 是否使用了降级策略
     */
    private boolean fallbackUsed;
    
    /**
     * 默认构造函数
     */
    public RAGResponse() {
    }
    
    /**
     * 只设置回答的构造函数
     */
    public RAGResponse(String answer) {
        this.answer = answer;
    }
    
    // Getters and Setters
    public String getQuestion() {
        return question;
    }
    
    public void setQuestion(String question) {
        this.question = question;
    }
    
    public String getAnswer() {
        return answer;
    }
    
    public void setAnswer(String answer) {
        this.answer = answer;
    }
    
    public List<String> getRelevantContexts() {
        return relevantContexts;
    }
    
    public void setRelevantContexts(List<String> relevantContexts) {
        this.relevantContexts = relevantContexts;
    }
    
    public List<Double> getSources() {
        return sources;
    }
    
    public void setSources(List<Double> sources) {
        this.sources = sources;
    }
    
    public long getProcessingTime() {
        return processingTime;
    }
    
    public void setProcessingTime(long processingTime) {
        this.processingTime = processingTime;
    }
    
    public boolean isFallbackUsed() {
        return fallbackUsed;
    }
    
    public void setFallbackUsed(boolean fallbackUsed) {
        this.fallbackUsed = fallbackUsed;
    }
}